<?php
class keader{
	public function remplace($chemin, $keader_table){
		$template=fopen($chemin,'rb')or die('le template :'.$chemin.' est inaccessible');
		$temp=fread($template, filesize($chemin));
		foreach($keader_table AS $to_replace => $by){
			$temp = preg_replace('/!:'.$to_replace.':!/',$by,$temp);		
		}
		fclose($template);
		return $temp;
	}
}